public class es1 {
	public static int a0[] = new int[10];
	public static int a1[] = new int[10];

	public static void main(String[] args) throws InterruptedException {

		for (int i = 0; i < a0.length; i++) {
			a0[i] = (int) (Math.random() * 100);

		}

		for (int i = 0; i < a0.length; i++) {
			a1[i] = (int) (Math.random() * 100);

		}

		Sommatore_scalare s1 = new Sommatore_scalare(0, a0.length/2);
		Sommatore_scalare s2 = new Sommatore_scalare((a0.length/2)+1, a0.length-1);
		s1.start();// se si usa implements Runnable bisogna usare thread.run,
		s2.start();
		System.out.println(s1.getSomma() + s2.getSomma());

	}
}
